from django.urls import re_path
from demo02 import views

urlpatterns = [

    re_path(r'^articles/([0-9]{4})/$', views.year_archive),
    re_path(r'^articles/2020/$', views.special_case_2020),
    # re_path(r'^articles/([0-9]{4})/$', views.year_archive),
    # re_path(r'^articles/([0-9]{4})/([0-9]{2})/$', views.month_archive),
    re_path(r'^articles/([0-9]{4})/([0-9]{2})/([\w-]+)/$', views.article_detail),

    # 演示命名参数
    re_path(r'^articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$', views.month_archive_names),

]
